/**
 * Created by yoyoyk on 2017/5/12.
 */
/**
 * Created by yoyoyk on 2017/5/12.
 */

import Relay from "react-relay";
export default class saveProSizeDetail extends Relay.Mutation {

    getMutation() {
        return Relay.QL`mutation { saveProSizeDetail }`;
    }

    getVariables() {
        return {
            argsInput: {
                sizeDetailId:this.props.processDemandId,
                pdId:this.props.pdId,
                content:this.props.content,
                fileJSON:this.props.fileJSON,
                imgJSON:this.props.imgJSON
            }
        }
    }

    getFatQuery() {
        return Relay.QL`fragment on saveProSizeDetailPayload {
             clientMutationId
             responseData{
                proSizeDetailModelList{
                    fileJSON
                    imgJSON
                    pdId
                }
                errorCode
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
               fragment on saveProSizeDetailPayload  {
                      clientMutationId
                      responseData{
                        proSizeDetailModelList{
                            fileJSON
                            imgJSON
                            pdId
                        }
                        errorCode
                    }
                 }
            `]
        }];
    }

}
